# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Giovanni Scafora <giovanni@archlinux.org> 
# Contributor: Biru Ionut <ionut@archlinux.ro>
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Aurelien Foret <orelien@chez.com>

pkgname=libtar
pkgver=1.2.20
pkgrel=6
_git='9c2e044833c5e908f5be0a77991b08849021793e'
pkgdesc='C library for manipulating POSIX tar files'
arch=('x86_64')
url='https://repo.or.cz/w/libtar.git'
license=('BSD')
depends=('zlib')
source=("libtar-${_git}.tar.gz::https://github.com/tklauser/libtar/archive/${_git}.tar.gz")
sha256sums=('21d86460dd128f56cfa391e4bc82e91f98e84c2948a854e33daed5c58d4e9cb6')

build() {
  cd "${srcdir}/${pkgname}-${_git}"

  autoreconf -fi
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --disable-static \
    --disable-encap \
    --disable-epkg-install
  make
}

package() {
  cd "${srcdir}/${pkgname}-${_git}"

  make DESTDIR="${pkgdir}" install
  install -D -m0644 COPYRIGHT "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
